package entity;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;

public class InfoBooking {

	private int id;
	private int id_customer;//id khách hàng
	private int number_room;// Số lượng phòng
	private int payment ; // Tình trạng thanh toán
	private int total ; // Tổng giá ti�?n phải thanh toán
	private String date; // Ngày đăng ký
        private int status;
        private String checkin;
        private String checkout;
        private Customer customer;        
        
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getId_customer() {
		return id_customer;
	}
	public void setId_customer(int id_customer) {
		this.id_customer = id_customer;
	}

	public int getNumber_room() {
		return number_room;
	}
	public void setNumber_room(int number_room) {
		this.number_room = number_room;
	}
	public int getPayment() {
		return payment;
	}
	public void setPayment(int payment) {
		this.payment = payment;
	}
	public int getTotal() {
		return total;
	}
	public void setTotal(int total) {
		this.total = total;
	}
	public String getDate() {
            
		return date;
	}
	public void setDate(String date) {
		this.date = date;
	}

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public Customer getCustomer() {
            return customer; 
        }

        public void setCustomer(Customer customer) {
            this.customer = customer;
        }

        public String getCheckin() {
            return checkin;
        }

        public void setCheckin(String checkin) {
            this.checkin = checkin;
        }

        public String getCheckout() {
            return checkout;
        }

        public void setCheckout(String checkout) {
            this.checkout = checkout;
        }
        private String covertToDate(String date){
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            Date d = null;
            try {
                d = sdf.parse(date);
            } catch (ParseException ex) {
                return date;
            }
            SimpleDateFormat sd = new SimpleDateFormat("dd-MM-yyyy");
            return sd.format(d);
        }

}
